package org.groovymud.utils;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class MessageBucket {

    private Map<String, String> messageBucket;

    public Map<String, String> getMessageBucket() {
        if (messageBucket == null) {
            messageBucket = Collections.synchronizedMap(new HashMap<String, String>());
        }
        return messageBucket;
    }

    public Object putMessage(String key, String value) {
        return getMessageBucket().put(key, value);
    }

    public String getMessage(String key) {
        // TODO Auto-generated method stub
        return getMessageBucket().get(key);
    }

}
